package com.study.collection.basic.demo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;

public class CollectionTest {

    public static void main(String[] args) {
        //ArrayList 同步处理
        List<String> list = new ArrayList<>();
        System.out.println(list.hashCode());
        list = Collections.synchronizedList(list);
        System.out.println(list.hashCode());

        ReentrantLock reentrantLock = new ReentrantLock();

        reentrantLock.lock();
    }
}
